﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using PMPUtils.Report;
using PMPUtils.Form;

namespace PMP.Report
{
    public partial class Burndown : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            FormUtil.Authenticate(Session, Response);

            if (!IsPostBack)
            {
                txtSprint.Text = Request.Params["SPRINT"];

                RefreshGridView();
            }
        }

        protected void btnRefresh_Click(object sender, EventArgs e)
        {
            RefreshGridView();
        }

        private void RefreshGridView()
        {
            BurndownOperator.RefreshGridView(txtSprint.Text.Trim(), grvBurndown);

            GridViewOperator.RefreshBurndownBackgroudColor(grvBurndown, "NF1", txtSprint.Text.Trim());
            GridViewOperator.RefreshBurndownBackgroudColor(grvBurndown, "NF2", txtSprint.Text.Trim());
        }
    }
}
